﻿<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>

<!-- 为 ECharts 准备一个具备大小（宽高）的 DOM -->
<div id="test" style="width: 600px;height:400px;"></div>

<%--<script type="text/javascript" src="https://cdn.goeasy.io/goeasy-1.2.1.js">--%>
<%--以下正确--%>
<script type="text/javascript" src="https://cdn.goeasy.io/goeasy.js"></script>
<script type="text/javascript">
    console.log("1");
    var goEasy = new GoEasy({
        appkey:"BC-2187d9de930847288eb36ed08caa274a"
    });
    goEasy.subscribe({
        channel:"my_channel",
        onMessage:function (message) {
            console.info("通道:" + message.channel + "发布内容:" + message.content)
        }
    });

    // goEasy.publish({
    //     channel: 'demo_channel',
    //     message: 'Hello world!'
    // });

    "大家伙"
</script>